<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>借阅记录</title>

  <link href="../css/bootstrap.css" rel="stylesheet"/>
  <link href="../css/all.css" rel="stylesheet"/>
  <link href="../css/index.css" rel="stylesheet"/>
  
  <script src="http://at.alicdn.com/t/font_631371_o7qxle1nebmg3nmi.js"></script>
  <script src='../js/jquery-2.0.3.min.js'></script>
  <script type="text/javascript">
  function toBook(id){
		 window.parent.location.href='../book/'+id;
  }
  </script>
  <style>
  	.myOrderLi li{
  	padding-left:30px;}
  </style>
</head>
<body>
  <div class="container container-top">
  
    <div class="collection-div">
    <th:block th:if="${#lists.isEmpty(borrowList)}">
    	<h5 style="text-align: center">什么都没有？赶紧去借阅吧</h5>
    </th:block>
    
    <th:block th:if="${not #lists.isEmpty(borrowList)}">
	    <th:block th:each="borrow,index:${borrowList}">
	      <ul class="order_lists myOrderLi clear-f">
	    	<li>
	          <p th:text="'借阅编号：'+${borrow.borrowId}"></p>
	        </li>
	        <li>
	          <p th:text="'借阅时间：'+${#dates.format(borrow.borrowTime,'yyyy-MM-dd hh:dd:ss')}"></p>
	        </li>
	        <li>
	          <p th:text="'应归还时间：'+${#dates.format(borrow.returnTime,'yyyy-MM-dd hh:dd:ss')}"></p>
	        </li>
	        <li>
	          <div th:switch="${borrow.isDeal}">
	          		<p th:case="0">借阅状态：未取书</p>
	          		<p th:case="1">借阅状态：已取书</p>
	          		<p th:case="2">借阅状态：已还书</p>
	          </div>
	        </li>
	      </ul>
	      <ul class="order_lists clear-f">
	        <li class="list_con">
	          <div class="list_img">
	            <a>
	              <img th:src="${borrow.book.bookpicture}" alt="图书图片"/>
	            </a>
	          </div>
	          <div class="list_text">
	            <a th:onclick="'javascript:toBook('+${borrow.book.bookid}+')'" th:text="${borrow.book.bookname}">书名</a>
	            <br/>
	            <p style="color:#9c9c9c" th:text="'借阅数量：'+${borrow.amount}+'（本）'"></p>
	          </div>
	        </li>
	        <li class="list_info">
	          <p th:text="'作者：'+${borrow.book.bookauthor}"></p>
	          <p th:text="'类型：'+${borrow.book.type.typename}"></p>
	          <p th:text="'出版社：'+${borrow.book.bookpress}"></p>
	        </li>
	        <li class="list_info">
	          <div th:switch="${borrow.isOvertime}">
	          	<div th:case="'0'">
	          		<p>归还准时</p>
	          		<p th:text="'实际归还时间：'+${#dates.format(borrow.actualReturnTime,'yyyy-MM-dd hh:dd:ss')}"></p>
	          		<p th:text="'图书情况：'+${borrow.bookSituation}"></p>
	          		<p th:text="'借阅处理结果：'+${borrow.result}"></p>
	          	</div>
	          	<div th:case="'1'">
	          		<p>归还超期</p>
	          		<p th:text="'实际归还时间：'+${#dates.format(borrow.actualReturnTime,'yyyy-MM-dd hh:dd:ss')}"></p>
	          		<p th:text="'图书情况：'+${borrow.bookSituation}"></p>
	          		<p th:text="'借阅处理结果：'+${borrow.result}"></p>
	          	</div>
	          	<p th:case="*">未归还</p>
	          </div>
	          
	        </li>
	      </ul>
	     </th:block> 
     </th:block>  
      
    </div>
   
  </div>


  <script type="text/javascript" src="../js/bootstrap.min.js"></script>
</body>

</html>
